<template>
  <div class="item">
    <img :src="url" alt="" />
    <div
      class="btn"
      @click="handelClick"
      :style="btnBgc"
    >
      {{ current ? "正在使用" : "设为背景" }}
    </div>
  </div>
</template>

<script>
export default {
  props: ["url", "bgc", "id","btnBgc", "current"],
  methods: {
    handelClick() {
      this.$emit("clicked")
    },
  },
};
</script>

<style lang="less" scoped>
.item {
  position: relative;
  width: 49%;
  margin-bottom: 10 / 360 * 100vw;
  img {
    width: 100%;
  }
  .btn {
    position: absolute;
    right: 10 / 360 * 100vw;
    bottom: 10 / 360 * 100vw;
    padding: 2 / 360 * 100vw 4 / 360 * 100vw;
    font-size: 12 / 360 * 100vw;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 4 / 360 * 100vw;
  }
}
</style>
